<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%@page import="org.hibernate.Query"%>
<%@page import=" org.hibernate.Session"%>
<%@page import="org.hibernate.SessionFactory"%>
<%@page import="org.hibernate.Transaction "%>
<%@page import="org.hibernate.cfg.Configuration "%>
<%@page import=" org.hibernate.criterion.Restrictions"%>
<%@page import="vo.Custom"%>
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="com.opensymphony.xwork2.ActionSupport"%>
<%@page import="org.HibernateSessionFactory" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'checklist.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body><center>
<% Session s=null;
    Transaction tx=null;
		s=HibernateSessionFactory.getSession();
		tx=s.beginTransaction();
		String hql="from Custom";
		    Query query=s.createQuery(hql);
		    List<Custom> list=query.list();
		    Iterator<Custom> its=list.iterator();
		while(its.hasNext()){Custom custom=(Custom)its.next();%><br><%
		out.print("用户"+custom.getCustomId()+" : "+ custom.getCustomname() + " 密码:"+custom.getPassword());}%> <br>
		<a href="Rootloginsuccess.jsp">返回上一页</a><br><br>
		<a href="index.jsp">返回主界面</a><br>
  </center></body>
</html>
